//  [9/18/2013 OMEGA] created

#include <QObject>
#include <QtWidgets/QStyledItemDelegate>
#include "DuelAssENoFocusDelegate.h"

NoFocusDelegate::NoFocusDelegate( QObject* parent /*= 0*/ ) : 
	QStyledItemDelegate(parent)
{

}

void NoFocusDelegate::paint(QPainter* painter, const QStyleOptionViewItem & option, const QModelIndex &index) const
{
	QStyleOptionViewItem itemOption(option);
	if (itemOption.state & QStyle::State_HasFocus)
	{
		itemOption.state = itemOption.state ^ QStyle::State_HasFocus;
	}
	QStyledItemDelegate::paint(painter, itemOption, index);
}
